package com.cashop.mcp.sse.model;

public class Event {
    private int id;
    private String data;
    private long timestamp;

    public Event() {
    }

    public Event(int id, String data) {
        this.id = id;
        this.data = data;
        this.timestamp = System.currentTimeMillis();
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }

    @Override
    public String toString() {
        return "Event{" +
                "id=" + id +
                ", data='" + data + '\'' +
                ", timestamp=" + timestamp +
                '}';
    }
}